<?php
namespace app\index\controller;
use think\facade\Hook;

class Index
{
    public function index()
    {
        // 银行卡保存处理钩子
        $data = $params = [];
        $hook_name = 'plugins_service_account_save_handle';
        $ret = HookReturnHandle(Hook::listen($hook_name, [
            'hook_name'     => $hook_name,
            'is_backend'    => true,
            'params'        => &$params,
            'data'          => &$data,
            'account_id'    => isset($params['id']) ? intval($params['id']) : 0,
        ]));
        print_r($data);
    }

    public function hello($name = 'ThinkPHP5')
    {
        return 'hello,' . $name;
    }
}
